import React from 'react'


class Hello extends React.Component{


    handleClick(){
        alert("我被点击了")
    }

    render(){
        return(
            <button onClick={this.handleClick}>
                点击我
            </button>
        )
    }
}


function Ok (){
    function zhen(){
        alert("hello react")
    }

    return (
        <button onClick={zhen}>
            点击
        </button>
    )
}

export default Ok